# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=yambar
pkgver=1.11.0
pkgrel=0
pkgdesc="Modular status panel for X11 and Wayland, inspired by Polybar"
url="https://codeberg.org/dnkl/yambar"
license="MIT"
arch="all"
makedepends="
	alsa-lib-dev
	bison
	eudev-dev
	fcft-dev
	flex
	json-c-dev
	libmpdclient-dev
	meson
	pipewire-dev
	pixman-dev
	scdoc
	tllist-dev
	wayland-dev
	wayland-protocols
	xcb-util-cursor-dev
	xcb-util-dev
	xcb-util-wm-dev
	yaml-dev
	"
checkdepends="font-dejavu"
subpackages="$pkgname-doc $pkgname-dev $pkgname-zsh-completion"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/dnkl/yambar/archive/$pkgver.tar.gz
	fix-missing-break-in-switch-statement.patch
	"
builddir="$srcdir/$pkgname"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
af932799916316b152767be2ba57b53d4eba38ab295731a96a29ca20d70e3df30163ebe55981a98b540cef43412ac635d55d477fdf2d9b5a47f7dc5c34985272  yambar-1.11.0.tar.gz
8fe81e384d3442ea4b9b6ebf375c229f455314a04a8ba78b4dc34080dd48ea58e1f0f0c5695fe718977bcb52b0af054412c1f49423124a1cae6aa10e360b7b33  fix-missing-break-in-switch-statement.patch
"
